Recently, I started practicing and learning music theory and found out that there's "Vibr" written in the sheet when the piece--or any aspect of it-- needs to be played with vibrato but then I looked up this beginner piece called "Au Claire de la Lune" (which is a sort of french lullaby I think) that's played with vibrato. That's not what's bothering me. What's bothering me is that the sheet music doesn't state that it needs to be played with vibrato. So, how do you know if something needs to be played with vibrato if it's not stated in the sheet music but professionals are using vibrato? Or is vibrato used as something extra sometimes to add flair?
It's excellent that you're asking yourself this question! It's always disappointing (IMO) when a violinist just adds as much vibrato as they can to a piece without thinking whether it's really improving the performance.
Vibrato adds another dimension of expression to the performance - you can use addition of vibrato to emphasise certain notes, and also vary vibrato speed and depth to add interest to long notes. If multiple string players are playing together, a little vibrato can give a nice 'chorus' effect to the ensemble.
On the other hand, too much vibrato can (again IMO) spoil the harmony of a piece - after all, you are deliberately playing less 'in-tune'. And unfortunately, many violinists seem to use vibrato to cover up the fact that they can't produce a rich, satisfying tone without vibrato - or (even worse) that their intonation is off!
One thing to consider is whether prominent vibrato is expected in the style in which you're playing. As a huge generalisation, baroque and earlier musics are often played with little vibrato, while performances of later musics can be expected to introduce more prominent vibrato. Some folk music styles, such as British and Celtic music, also tend to avoid vibrato.
Another reason why soloists may choose to use vibrato is to 'project' their performance over the accompanying performers.
A common pattern is to use more vibrato at climaxes, on notes that would be considered especially emotionally stirring. And of course you've pointed out that it may be directed in the sheet music.
In my opinion, "Au Claire de la Lune" is such a well-known piece that it's entirely acceptable to play your own interpretation of it, using vibrato and other expressive techniques purely according to your taste. And I think the best attitude to vibrato is that it's only one of the expressive techniques in your toolbox, along with dynamics, timbral variations, portamento, rubato, and so on.
Whether or not to use vibrato and if so how much are questions of musical taste and interpretation.
First, because vibrato adds emphasis to a note the amount that is used can be varied to shape a musical phrase. Augustin Hadelich explains and demonstrates this really well in this YouTube video.
There are often clues in the dynamic markings. In the romantic piece which every intermediate violinist likes to play to practice their vibrato, The Meditation from Massenet's opera Thais, bars 20 and 21 are both marked diminuendo. Bar 19 is four quarter notes, 20 is two half notes and 21 is one whole note. The tempo on bar 21 is 54. With the notes getting longer and longer the temptation is to use more and more vibrato but that is the exact opposite of what the markings are suggesting.
Here is Anne-Sophie Mutter playing the quarter notes with plenty of vibrato, the half notes with very little vibrato and the whole note with none whatsoever! Quite a shock for me the first time I saw it. In contrast here is Janine Jensen reducing her vibrato over the same bars but still retaining some vibrato on the whole note. Even for the top pros it is a question of personal taste and interpretation albeit within limits.