No, the players do not get the attack and to-hit bonuses
Yes, the players get the magic item effects (with permission)
Let us examine the Flind closely (Volo's, pg 153).
The Flind's statistics
Its Challenge Rating is 9. Additionally, its attributes are:
Str 20 (+5), Dex 10 (+0), Con 19 (+4), Int 11 (+0), Wis 13 (+1), Cha 12 (+1)
Due to being CR 9, it must also have a proficiency of +4. You can refer to the Monster Statistics by Challenge Rating table in DMG 274. Under the CR column, look for the "9" row. There is a "Prof. Bonus" column to its right which says "+4"
The rules for attack rolls
Flinds use melee weapons for their attacks. Now, any attack roll with a melee weapon which a creature is proficient with will typically be a 1d20 + Strength + proficiency bonus. Sometimes there are other modifiers, such as those provided by Bardic Inspiration, but let's set those aside for now. See the rules on this below:
Attack Rolls, PHB pg 192
[...] To make an attack roll, roll a d20 and add the appropriate modifiers. [...]
[...]
Modifiers to the Roll
When a character makes an attack roll, the two most common modifiers to the roll are an ability modifier and the character's proficiency bonus. [...]
Ability Modifier. The ability modifier used for a melee weapon attack is Strength, and the ability modifier used for a ranged weapon attack is Dexterity. Weapons that have the finesse or thrown property break this rule. [...]
Proficiency Bonus. You add your proficiency bonus to your attack roll when you attack using a weapon with which you have proficiency, as well as when you attack with a spell.
The derivation of the Flind's to-hit bonus
So now, we can get the to-hit bonus for a Flind. It should be:
$$\text{to-hit bonus} = 5 (\text{Strength mod}) + 4 (\text{proficiency mod}) = 9$$
What this means is, if you hand the weapon over to another creature with a different proficiency bonus and different Strength score, it will have a different modifier.
The other creature does not inherit the to-hit bonus of the weapon because it does not have the same statistics as the Flind.
If a PC who is proficient with flails picks up the flail from the dead body of a Flind, and say they were level 4 with Str 18, then their to-hit bonus will be +6. This is because:
$$\text{to-hit bonus} = 4 (\text{Strength mod}) + 2 (\text{proficiency mod}) = 6$$
And still, if another monster, such as a Girallon (Volo's, pg 152) were to suddenly pick up the flail, it would have only a +4 to-hit bonus. Why? Because it is not proficient with the flail. It would not add its proficiency bonus, just its Strength modifier.
What about the magic effects?
Flinds can do three types of attack with the same flail. These are the Flail of Madness attack, Flail of Pain attack, and Flail of Paralysis attack. If the PCs actually pick this up, will they be able to replicate these abilities?
When you look at the image of the Flind, you will see they use magical flails.

Notice that there are two skull-stars attached to the handle by shadow, not by strings. This may indicate that the flail itself is special, and not something you will find from the PHB.
As support, you will see that the description of the Flind actually confirms this:
Flind, Volo's pg 153
A flind is an exceptionally strong and vicious gnoll that commands and directs the war band it is a part of. It wields a flail imbued with powerful magic by Yeenoghu himself. (emphasis mine)
What I imagine is that each star corresponds to a type of attack, and there are three stars, not two. Since this is clearly a magical flail, perhaps the stars materialize at the will of its user. Perhaps I'm imagining something off-base, but whatever the case, the Flind in Volo's pg 153 is clearly using a magical flail.
So what happens when your PCs loot the flail off the Flind?
If they make an attack with the flail and they are proficient in it, their attack rolls will be:
$$\text{1d20} + \text{Strength mod} + \text{proficiency bonus}$$
And their damage roll will be:
$$\text{1d10} + \text{Strength mod}$$
The damage dice is from the damage dice you see in the Flind's stat block. But there are some additional effects as a result of using that particular flail, assuming you allow them to use these effects.
Flail of Madness: 1d10 + Str mod bludgeoning damage, and the target must make a DC 16 Wisdom saving throw
Flail of Pain: 1d10 + Str mod bludgeoning damage, plus 4d10 psychic damage
Flail of Paralysis: 1d10 + Str mod bludgeoning damage, and the target must succeed on a DC 16 Constitution saving throw
As the DM, you can just say the flails don't work in the hands of a non-Flind or non-Gnoll. This solves your issue of passing on power to the players unintentionally. But if they were actually able to use the flails, they would be able to do the above.
For additional light reading, you may refer to The Angry GM's Monster Building articles: 101, 201, 202, and supplement. They are entertaining reads which will dissect monster building in at least 20,000 words (warning: he might curse by saying f$&% instead of actually swearing).