Inverted repeats play an important role in riboswitches, which are RNA regulatory elements that control the expression of genes that produce the mRNA, of which they are part.  A simplified example of the flavin mononucleotide (FMN) riboswitch is shown in the illustration. This riboswitch exists in the mRNA transcript and has several stem-loop structures upstream from the coding region.  However, only the key stem-loops are shown in the illustration, which has been greatly simplified to help show the role of the inverted repeats.  There are multiple inverted repeats in this riboswitch as indicated in green (yellow background) and blue (orange background). 
In the absence of FMN, the Anti-termination structure is the preferred conformation for the mRNA transcript. It is created by base-pairing of the inverted repeat region circled in red.  When FMN is present, it may bind to the loop and prevent formation of the Anti-termination structure.  This allows two different sets of inverted repeats to base-pair and form the Termination structure.  The stem-loop on the 3 end is a transcriptional terminator because the sequence immediately following it is a string of uracils (U).  If this stem-loop forms (due to the presence of FMN) as the growing RNA strand emerges from the RNA polymerase complex, it will create enough structural tension to cause the RNA strand to dissociate and thus terminate transcription.  The dissociation occurs easily because the base-pairing between the Us in the RNA and the A's in the template strand are the weakest of all base-pairings.  Thus, at higher concentration levels, FMN down-regulates its own transcription by increasing the formation of the termination structure.