FLAC is one way to compress audio file so that when players uncompress it back for playing no information is lost (hence lossless compression). Other lossless formats are APE WAV ALAC.
This is opposed to MP3 and AAC compression that reduce file size by chopping some audio information away (eg frequency beyond 20kHz which arguably you cannot hear). When player uncompresses these what have been chopped cannot be restored (hence lossy compression).
M4A is container that can hold either AAC (lossy) or ALAC (lossless) audio. If M4A contains ALAC, converting to FLAC is just matter of preference and/or compatibility with player (as ALAC contains original/unaltered audio ... FLAC will preserve that ... but both files will have exactly same audio)
Now if M4A contains AAC. Any audio information AAC has chopped off when it was created is lost ... forever. Converting to FLAC will not restore that lost information. All FLAC guarantees is when player plays it, FLAC will get you exactly what AAC contained (to give you opposite example, say you convert your AAC to MP3 ... MP3 will chop off additional information away ... so when you play that MP3 it will not be exact audio contained in original AAC).
To conclude ... moving from one audio format to another will never improve audio quality (moving between players can ... depending on their implementation). If you hear improvement in FLACs converted from M4A, its likely either player you using "renders" FLAC better than M4A ... or just placebo ... as those FLAC contain exact same audio as in original M4A