This an expression that we love to use when something is difficult to find. As you can imagine, a needle is very small and would be difficult to find in the stack of hay to your left. So any time something is challenging to find, you can use this expression. I always think of those Where is Waldo books where you have to find Waldo in a crowd of people. It's like trying to find a needle in a haystack.
Examples on YouTube
Examples on Twitter
Examples in the news
Examples in movies and TV shows
Examples on Instagram