I'm sure the question of a medium character using a large weapon was asked often here, but what about the reverse?
Say a medium sized character wanting to use a small dagger, like strictly as a throwing knife are there any rules for that?
They are the same as the rules for wielding a too large weapon. It´s the same in both D&D 3.5e and Pathfinder, I'm linking the D&D 3.5e SRD below.
Inappropriately Sized Weapons
A creature can’t make optimum use of a weapon that isn’t properly sized for it. A cumulative -2 penalty applies on attack rolls for each size category of difference between the size of its intended wielder and the size of its actual wielder. If the creature isn’t proficient with the weapon a -4 nonproficiency penalty also applies.
The measure of how much effort it takes to use a weapon (whether the weapon is designated as a light, one-handed, or two-handed weapon for a particular wielder) is altered by one step for each size category of difference between the wielder’s size and the size of the creature for which the weapon was designed. If a weapon’s designation would be changed to something other than light, one-handed, or two-handed by this alteration, the creature can’t wield the weapon at all.
When a Medium creature tries to throw a Small dagger (let's assume you just killed a Goblin and took their weapon?) you're trying to use a weapon that's one size wrong for you. That means you'd be taking a -2 penalty when using.
However, the second part of the rules says that you need to change the designation of the weapon by one step. In this case, one step down because the weapon is too small. A dagger is normally Light, and there is nothing that goes down one step. That means the weapon is simply too small for you to wield, so in this case you're not allowed to use it at all.
Let's say you grab the Goblin's longsword instead. The longsword is normally a one-handed weapon. Moving the designation down one step, that means you get to use it as if it were a light weapon. Since the size category is still off by one, you take a -2 on attack rolls with it.
A Huge shortsword is off two categories (in the other direction). That means you're taking a -4 penalty to attack rolls with it. Moving the designation of the weapon up two places, it goes from being light to being two-handed, so you can swing this massive shortsword in two hands, awkwardly.