It is not a matter of formality; the most that can be said is that the past perfect often occurs as a hyper-correction. Use past perfect if the order of past events is otherwise unclear, or if you wish to emphasize the priority of the earlier event; otherwise, use simple past.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.