You interpret when Richard Platt was there as a "free relative clause" acting as object of the preposition before.
Free relatives do act as NPs (noun phrases), both as sentence constituents and objects of prepositions:
Last Saturday is [when Richard Platt was there].
[When Richard Platt was there] was last Saturday, not Friday.
I was searching the calendar for [when Richard Platt was there].
But it is unlikely that the author means "before [(the time) when Richard Platt was there]". It is more likely that 1) before is an adverb, and 2) the when clause is an ordinary temporal clause = "at times when Richard Platt was there".
Thus, although the sentence is ambiguous and could bear your interpretation, what it probably means is
I had been to dinner at Mike's on two previous occasions. On both of those occasions Richard Platt was there.
Hellion and Tyler James Young point out another ambiguity. As the sentence stands, without a comma, when Richard Platt was there must be read as a restrictive relative clause, meaning the author is speaking only about those occasions when both he and Richard Platt were present; there may have been occasions when the author dined at Mike's and Richard Platt was not there. My reading above technically requires a comma after before to mark the when clause as non-restrictive and imply that the two occasions named are all the occasions when the author dined at Mike's. In its absence, a better reading would be:
On two previous occasions when I had been to dinner at Mike's Richard Platt was there, too.