Google hasn't been very helpful. It is about Sparta during the Peloponnessan War if that matters.
If I were a pedant I would say that every single part of this claim is wrong. There is no hard evidence behind any of it. But it would be more honest to say that it appears to be a simplification, elaboration and/or misunderstanding of some things our sources tell us about Sparta.
First, there was no law that forced men to marry at a certain age. Spartan men were expected to be married by the time they reached full maturity, which the Greeks generally set at age 30. This served both a political purpose - making sure all citizens spent their best years producing sons for the state - and a personal one, since marriage and offspring secured the continuation of a male citizen's estate. So while it's wrong to say that Spartan men had to marry when they reached maturity, it would be fair to say that they generally did. (As an aside, Spartan women seem to have married slightly later than the women of other Greek states, partly to ensure the health of their offspring; brides might be 17-18 years old rather than the more common 14-15.)
The writers for AC:Odyssey presumably set the lower age bracket at 25 because our sources tell us that newly married Spartan men would have to sneak out of their tent group at night to go home and be with their wives, since the law required them to spend the night with their messmates. Plutarch claims that some men carried on doing this for so long that they became fathers without ever seeing their wives in daylight (Lykourgos 15.5). But the scenario only makes sense for the period in which men were required to stay with their tent group, which ended at age 30. While no source gives us the actual age of 25, it's reasonable enough as a general estimate if we have to accomodate years (potentially) of undercover married life. The upper age bracket of 35 is arbitrary.
Second, the consequences of remaining unmarried are a confusion of Aristotle, Politics 1270b.1-4 and Plutarch, Lykourgos 15.1-2. The latter source lists the punishments for bachelors: they were not allowed to watch boys and girls exercising, they were forced to march around the agora in winter singing a humiliating song, and they were not granted the deference that was normally given to senior citizens. As you can see, this does not align with either of the punishments mentioned in AC:Odyssey. At best, we could argue that the prohibition on watching exercises might also have excluded them from major festivals like the Gymnopaideia, which featured processions and dances in honour of Apollo (though Plutarch does not say explicitly that this was a consequence of the law). We could also argue that, since anecdotes about deference to seniors often include younger men giving their seat to older ones, being denied this form of respect could in practice mean not getting a seat at festivals. But this is a bit of a stretch and probably not what the writers were getting at.
Plutarch says nothing about taxes. However, Aristotle mentions the opposite of the claim you cite: at Sparta, men with three sons were exempt from military service, while men with four sons earned exemption from all taxes. It is not clear which taxes this referred to, since we know very little about the Spartan taxation system; it is possible that the reference is simply to the mess dues that were the main public burden on Spartan households. All citizens were required to pay mess dues on pain of losing their citizenship. Exemption from this tax would have been a very strong incentive. It seems likely to me that someone working on AC:Odyssey got this anecdote the wrong way round, and assumed that people with no sons would be punished with a tax, rather than people with many sons being exempt from tax. They are not the same thing, but these strange regulations are easily misremembered.