This is generally used in the context when, One was previously unknown and is now prominent.
This is mostly used when one gets into limelight suddenly, when he shares all the spotlight with the stars.
1) Manish Pandey of Royal Challengers was the dark horse of the team.It was only after he scored a century, people recognised him.
2)I was the dark horse of my project team.I executed a program which my team leader was unable to do.
3) Peter used to perform very badly in his football team, but it was only after the other day match, he was considered as the dark horse of the team.
4) It is always good to be a star rather than being a dark horse.