The party doubled its representation at Holyrood after claiming 31 seats with Scottish Conservative leader Ruth Davidson claiming a shock victory over the SNP in the Edinburgh Central seat.
Mr Cameron congratulated his Scottish leader in a message on Twitter.
He added: “She is a leader who will stand up to the SNP and give Scotland strong opposition.”
Scottish Secretary David Mundell said it would be “good for Scotland, good for the Scottish Parliament” to have the Tories as the official party of opposition.
The Conservative MP said: “Ruth has demonstrated throughout this campaign that she is the one politician that can go toe-to-toe with Nicola Sturgeon, that she can stand up to demands for a second referendum.
“She can also scrutinise the SNP and make sure they deliver on promises they have made on health, on education, and I think by doing that we will get better government and that will be good for everyone in Scotland.”
He added: “It will be a seismic change in Scottish politics that the Scottish Conservatives are the second party in the Scottish Parliament.
“I was a candidate back in those first elections in 1999, it would have been incredible to think the Scottish Conservatives could have finished ahead of Labour and be the official opposition.
It demonstrates that Ruth has transformed our party in Scotland, taken it forward and given us, I hope, a very significant role in the next Scottish Parliament.”